#include<stdio.h>
#include<iostream>
#include<string.h>
#include <algorithm>
using namespace std;
int main()
{
	int i;
	char str[10000+5];
	while (cin >> str)
	{
		for (i = strlen(str) - 1; i >= 0; i--)cout << str[i];
		cout << endl;
	}
	return 0;
}